package com.jokey.vue.model;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;

import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.time.LocalDate;

/**
 * @author: JokeyZheng
 * @email: zhengjingfeng@ruqimobility.com
 * @created: 2021/11/25 20:36
 * @version: v1.0.0
 * <p>员工信息表</p>
 */
@Data
@TableName(value = "employee", autoResultMap = true)
public class Employee implements Serializable {
	
	/**
	 * 主键ID
	 */
	@TableId(type = IdType.AUTO)
	private Integer id;
	
	/**
	 * 名称
	 */
	private String name;
	
	/**
	 * 性别
	 */
	private String gender;
	
	/**
	 * 出生日期
	 */
	@JsonFormat(pattern = "yyyy-MM-dd", timezone = "Asia/Shanghai")
	private LocalDate birthday;
	
	/**
	 * 身份证号码
	 */
	private String idCard;
	
	/**
	 * 婚姻状况
	 */
	private String wedLock;
	
	/**
	 * 民族
	 */
	private Integer nationId;
	
	/**
	 * 籍贯
	 */
	private String nativePlace;
	
	/**
	 * 政治面貌
	 */
	private Integer politicId;
	
	/**
	 * 邮箱
	 */
	private String email;
	
	/**
	 * 电话号码
	 */
	private String phone;
	
	/**
	 * 联系地址
	 */
	private String address;
	
	/**
	 * 所属部门
	 */
	private Integer departmentId;
	
	/**
	 * 职称ID
	 */
	private Integer jobLevelId;
	
	/**
	 * 职位ID
	 */
	private Integer posId;
	
	/**
	 * 聘用形式
	 */
	private String engageForm;
	
	/**
	 * 最高学历
	 */
	private String tipTopDegree;
	
	/**
	 * 专业
	 */
	private String specialty;
	
	/**
	 * 毕业院校
	 */
	private String school;
	
	/**
	 * 入职日期
	 */
	@JsonFormat(pattern = "yyyy-MM-dd", timezone = "Asia/Shanghai")
	private LocalDate beginDate;
	
	/**
	 * 在职状态
	 */
	private String workState;
	
	/**
	 * 工号
	 */
	private String workId;
	
	/**
	 * 合同期限
	 */
	private Double contractTerm;
	
	/**
	 * 转正日期
	 */
	@JsonFormat(pattern = "yyyy-MM-dd", timezone = "Asia/Shanghai")
	private LocalDate conversionTime;
	
	/**
	 * 离职日期
	 */
	@JsonFormat(pattern = "yyyy-MM-dd", timezone = "Asia/Shanghai")
	private LocalDate notWorkDate;
	
	/**
	 * 合同起始日期
	 */
	@NotNull(message = "请填写合同起始日期")
	@JsonFormat(pattern = "yyyy-MM-dd", timezone = "Asia/Shanghai")
	private LocalDate beginContract;
	
	/**
	 * 合同终止日期
	 */
	@NotNull(message = "请填写合同终止日期")
	@JsonFormat(pattern = "yyyy-MM-dd", timezone = "Asia/Shanghai")
	private LocalDate endContract;
	
	/**
	 * 工龄
	 */
	private Integer workAge;
	
	@TableField(exist = false)
	private Nation nation;
	
	@TableField(exist = false)
	private PoliticsStatus politicsStatus;
	
	@TableField(exist = false)
	private Department department;
	
	@TableField(exist = false)
	private JobLevel jobLevel;
	
	@TableField(exist = false)
	private Position position;
	
	@TableField(exist = false)
	private Salary salary;
	
}
